<?php
if (!defined('APP_ID')) { die('No direct script access allowed'); }

/**
 * Tools controller
 */
class Controller_Tools extends Controller_Template {
	protected $_template = 'other/master';
	
	public function cacheAction($error = -1) {
		if (Input::isPostBack()) {
			Cache::clear();
			Tools::redirect(CURRENT_URL . '0');
			
		} else {
			$this->template->content = View::factory('tools/cache')
				->set('error', $error)
				->render();
		}
	}
}